<template>
  <bs-dialog :title="$t('审核确认')" :visible.sync="editor">
      <template slot="main">
        {{ $t('是否确定审核通过该终端？') }}
      </template>
      <template slot="footer">
            <bs-adopt-button-icon :show-icon="false" @click.native="doExamine(1)"></bs-adopt-button-icon>
            <bs-refuse-button-icon :show-icon="false" @click.native="doExamine(-1)"></bs-refuse-button-icon>
            <bs-cancel-button-icon :show-icon="false" @click.native="doCloseEdit"></bs-cancel-button-icon>
       </template>
    </bs-dialog>
</template>

<script>
export default {
  name: 'device-examine-dialog',
  data(){
      return{
          editor: false
      }
  },
  methods: {
    doExamine(val) {
      this.$eventBus.$emit('submitExamine', val);
      this.editor = false
    },
    // 显示
    show(editorForm) {
      this.editorForm = editorForm;
      this.editor = true;
    },
    // 关闭
    doCloseEdit() {
      this.editor = false;
    }
  },
  created() {
    this.$eventBus.$on('showDeviceExamineDialog', this.show);
  },
  beforeDestroy() {
    this.$eventBus.$off('showDeviceExamineDialog');
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog {
    width: 380px;
    height: 190px;
}
::v-deep .el-dialog__body {
    flex: 1;
    justify-content: center;
    display: flex;
    align-items: center;
}
::v-deep .el-dialog__footer {
  border-top: 0;
  padding: 10px 20px 20px;}
</style>
